import {
  Column,
  CreateDateColumn,
  DeleteDateColumn,
  Entity,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';

@Entity()
export class ArticleTag {
  @PrimaryGeneratedColumn()
  tag_id: number;

  @Column({ type: 'varchar', length: 20, unique: true, comment: '标签名称' })
  tag_name: string;

  @Column({ type: 'varchar', length: 255, comment: '标签描述' })
  tag_description: string;

  @Column({ type: 'varchar', length: 50, unique: true, comment: '标签别名' })
  tag_slug: string;

  @CreateDateColumn({ type: 'timestamp', comment: '创建日期' })
  create_date: Date;

  @UpdateDateColumn({ type: 'timestamp', comment: '更新日期' })
  update_date: Date;

  @DeleteDateColumn({ type: 'timestamp', select: false, comment: '删除日期' })
  remove_date: Date;
}
